package io.wit.modules.wit.service.impl;

import io.wit.modules.wit.dao.IntegralDao;
import io.wit.modules.wit.entity.IntegralEntity;
import io.wit.modules.wit.service.IntegralService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;



@Service("integralService")
public class IntegralServiceImpl implements IntegralService {
	@Autowired
	private IntegralDao integralDao;
	
	@Override
	public IntegralEntity queryObject(Long dataId){
		return integralDao.queryObject(dataId);
	}
	
	@Override
	public List<IntegralEntity> queryList(Map<String, Object> map){
		return integralDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return integralDao.queryTotal(map);
	}
	
	@Override
	public void save(IntegralEntity integral){
		integral.setCreateTime(new Date());
		integralDao.save(integral);
	}
	
	@Override
	public void update(IntegralEntity integral){
		integralDao.update(integral);
	}
	
	@Override
	public void delete(Long dataId){
		integralDao.delete(dataId);
	}
	
	@Override
	public void deleteBatch(Long[] dataIds){
		integralDao.deleteBatch(dataIds);
	}

	@Override
	public List<IntegralEntity> integralList() {
		return integralDao.integralList();
	}
	
}
